﻿@model SIG.Model.ViewModel.Identity.EditProfileVM

@using (Ajax.BeginForm("Edit", null, new AjaxOptions
{
    InsertionMode = InsertionMode.Replace,
    HttpMethod = "Post",
    OnSuccess = "updateSuccess"
}, new { @class = "form-horizontal", role = "form" }))
{

    @Html.AntiForgeryToken()


    <div class="form-horizontal">
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @Html.HiddenFor(model => model.UserId)

        <div class="form-group">
            @Html.LabelFor(model => model.UserName, htmlAttributes: new { @class = "control-label col-md-3" })
            <div class="col-md-9">
                <p class="form-control-static">
                    @Html.DisplayFor(model => model.UserName)
                </p>


            </div>
        </div>


        <div class="form-group">
            @Html.LabelFor(model => model.Email, htmlAttributes: new { @class = "control-label col-md-3" })
            <div class="col-md-9">
                @Html.EditorFor(model => model.Email, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Email, "", new { @class = "text-danger" })
            </div>
        </div>



        <div class="form-group">
            @Html.LabelFor(model => model.RealName, htmlAttributes: new { @class = "control-label col-md-3" })
            <div class="col-md-9">
                @Html.EditorFor(model => model.RealName, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.RealName, "", new { @class = "text-danger" })
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(model => model.Birthday, htmlAttributes: new { @class = "control-label col-md-3" })
            <div class="col-md-9">

                @Html.EditorFor(model => model.Birthday, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Birthday, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Gender, htmlAttributes: new { @class = "control-label col-md-3" })
            <div class="col-md-9">
                @Html.EnumDropDownListFor(model => model.Gender, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Gender, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Mobile, htmlAttributes: new { @class = "control-label col-md-3" })
            <div class="col-md-9">
                @Html.EditorFor(model => model.Mobile, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Mobile, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.QQ, htmlAttributes: new { @class = "control-label col-md-3" })
            <div class="col-md-9">
                @Html.EditorFor(model => model.QQ, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.QQ, "", new { @class = "text-danger" })
            </div>
        </div>




        <div class="form-group">
            @Html.LabelFor(model => model.IsActive, htmlAttributes: new { @class = "control-label col-md-3" })
            <div class="col-md-9">
                <div class="checkbox">
                    <label>
                        @Html.EditorFor(model => model.IsActive)
                        @Html.ValidationMessageFor(model => model.IsActive, "", new { @class = "text-danger" })
                    </label>
                </div>
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-3 col-md-9">
                <button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-save"></span> 更新</button>
                @Html.ActionLink("返回", "Index", null, new { @class = "btn btn-default" })
            </div>
        </div>
    </div>
}